def count_words(file_path):
    words=[]
    count_word={}
    with open(file_path,"r",encoding="utf-8") as file:
        for line in file:
            line.strip()
            words=line.split()
            for word in words:
                count_word[word]=count_word.get(word,0)+1
        print(count_word)        
file_path='example3.txt'
count_words(file_path)